package com.example.tse.rbhttpservice.service.shopping.model;

import java.util.List;
import java.util.ArrayList;
import com.example.tse.rbhttpservice.service.RudderResponse;


/**
* 获取购物车数据，用于下单页面（购买商品列表、收货地址、配送方式、支付方式、优惠券列表）
* @author wliu
* edit tse
*/
public class ShoppingGetForBuyGoods extends RudderResponse{

private String wareName = "";


private List<ShoppingGetForBuyGoodsGoods> goods = new ArrayList<ShoppingGetForBuyGoodsGoods>();


private String subTax = "";


/**
* @return wareName
*/
public String getWareName() {
return this.wareName;
}

/**
* @return wareName
*/
public void setWareName(String wareName) {
this.wareName = wareName;
}
/**
methodName    WareName
type          String
name          wareName
defaultType   ""
*/

/**
* @return goods
*/
public List<ShoppingGetForBuyGoodsGoods> getGoods() {
return this.goods;
}

/**
* @return goods
*/
public void setGoods(List<ShoppingGetForBuyGoodsGoods> goods) {
this.goods = goods;
}
/**
methodName    Goods
type          List<ShoppingGetForBuyGoodsGoods>
name          goods
defaultType   new ArrayList<ShoppingGetForBuyGoodsGoods>()
*/

/**
* @return subTax
*/
public String getSubTax() {
return this.subTax;
}

/**
* @return subTax
*/
public void setSubTax(String subTax) {
this.subTax = subTax;
}
/**
methodName    SubTax
type          String
name          subTax
defaultType   ""
*/

/**


    private static void filterFor(ShoppingGetForBuyGoodsGoods shopping) {
        if (shopping.getObjIdent() == null) {
            shopping.setObjIdent("");
        }
        if (shopping.getProductId() == null) {
            shopping.setProductId("");
        }
        if (shopping.getName() == null) {
            shopping.setName("");
        }
        if (shopping.getPrice() == null) {
            shopping.setPrice("");
        }
        if (shopping.getQuantity() == null) {
            shopping.setQuantity("");
        }
        if (shopping.getThumbnailPic() == null) {
            shopping.setThumbnailPic("");
        }
        if (shopping.getSpec() == null) {
            shopping.setSpec("");
        }
    }

    public static void filter(ShoppingGetForBuyGoods shopping) {
        if (shopping.getWareName() == null) {
            shopping.setWareName("");
        }
        if (shopping.getGoods() == null) {
            shopping.setGoods(new ArrayList<ShoppingGetForBuyGoodsGoods>());
        } else {
            for (ShoppingGetForBuyGoodsGoods item : shopping.getGoods()) {
                filterFor(item);
            }
        }
        if (shopping.getSubTax() == null) {
            shopping.setSubTax("");
        }
    }

*/

}
